package stack.queue;

public class Test {
    public static void main(String[] args) {
        Stack stack = new Stack();
        System.out.println("将北京,上海,广州三个元素压入栈");
        stack.Push("北京");
        stack.Push("上海");
        stack.Push("广州");
        while(!stack.isEmpty()){
            System.out.println("从栈中弹出:" + stack.Pop());
        }

        Queue queue = new Queue();
        System.out.println("将北京,上海,广州三个元素进入队列");
        queue.enqueue("北京");
        queue.enqueue("上海");
        queue.enqueue("广州");
        while (!queue.isEmpty()) {
            System.out.println("从队列中取出:" + queue.dequeue());
        }

    }
}
